package kr.co.sdworld.webclient.spring.controller;

import kr.co.sdworld.api.apns.service.AppService;
import kr.co.sdworld.webs.ServiceContext;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class CT_Delete 
{
	@Autowired
	private AppService appService;
	
	@RequestMapping(value = "/deleteApp.sd")
	public ModelAndView deleteApp()
	{
		String appIdCommaString = ServiceContext.getParameter("appIdCommaString");
		String[] appIdArray = appIdCommaString.split(",");
		appService.deleteApp(appIdArray);
		
		ModelAndView mnv = new ModelAndView("jsonView");
		mnv.addObject("result", "success");
		return mnv;
	}
}
